<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"></meta>
    <title>请假表</title>
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache"></meta>
    <meta HTTP-EQUIV="Expires" CONTENT="0"></meta>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}" media="all"></link>
    <link rel="stylesheet" th:href="@{/static/layui/css/modules/laydate.css}" media="all"></link>
</head>
<body>

<div style="width: 60%; margin: 0 auto; border: 1px solid  #E6E6E6; padding: 20px;">
    <form class="layui-form layui-form-pane" th:action="@{/leave/process/submit}" >
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title"  class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input userName" name="uname" th:value="${session.loginUserKey.user.name}" lay-verify="required" />
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-inline">
                    <!--表单自动填充部门信息,随着表单提交到差旅信息中,dname和deptId对应差旅信实体 -->
                    <input type="text" name="dname" class="layui-input" th:value="${dept.deptname}"/>
                    <input type="hidden" name="deptid" class="layui-input" th:value="${dept.deptid}"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">开始日期</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="sdate" name="sdate"  />
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">结束日期</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="edate"  name="edate" />
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">天数</label>
                <div class="layui-input-inline">
                    <input type="text" name="days" class="layui-input " lay-verify="required" id="dayscountshow" placeholder="请输入天数"></input>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">请假原因</label>
            <div class="layui-input-block">
                <textarea  class="layui-textarea" name="reason"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="" lay-filter="demo2">申请提交</button>
        </div>
    </form>
</div>
<script type="text/javascript" 	th:src="@{/static/layui/layui.js}"></script>
<script type="text/javascript" 	th:src="@{/static/js/leave.js}"></script>
</body>
</html>